import { Mesh, LineSegments } from "three"

export default class ModelConnection {
    obj: LineSegments
    id: string
    modelA: Mesh
    modelB: Mesh
    constructor(obj: LineSegments, modelA: Mesh, modelB: Mesh) {
        this.obj = obj
        this.id = this.obj.userData.id
        this.modelA = modelA
        this.modelB = modelB
    }

    toJSON() {
        return {
            id: this.id,
            modelA: this.modelA.userData.id,
            modelB: this.modelB.userData.id,
        }
    }
}
